<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
<h1>智能客服</h1>
<div id="content"></div>
<form id="f1">
  <input type="text" name="prompt"/>
  <input type="button" value="提交"/>
</form>
<script>
   $(function(){
      $(':button').click(function(){
         let params = $('#f1').serialize();
         $.ajax({
           url: '/ai/rag',
           type: 'get',
           data :params,
           success: function(result){
              $('#content').append(result + '<r>');
           }
         });
      });
   })
</script>
</body>
</html>